<template>
  <view>
    <!-- 一键登录 -->
    <MyLogin v-if="!token"></MyLogin>

    <!-- 用户信息 -->
    <MyUserinfo v-else></MyUserinfo>
  </view>
</template>

<script>
import badge from '../../mixins/badge'
import MyLogin from '@/components/my-login.vue'
import MyUserinfo from '@/components/my-userinfo.vue'
import { mapState } from 'vuex'
export default {
  mixins: [badge],
  computed: {
    ...mapState('user', ['token']),
  },
  components: {
    MyLogin,
    MyUserinfo,
  },
}
</script>

<style></style>
